package com.kevis.zhunblog.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.kevis.zhunblog.core.dto.PageDomain;
import com.kevis.zhunblog.core.dto.query.CommonClassQuery;

import java.util.List;
import java.util.function.Function;

/**
 * CommonClassService
 *
 * @Author kevis
 * @Date 2023/4/20 15:28
 */
public interface CommonClassService<T> extends BaseCommonService<T> //IService<T>
{
    List<T> selectByParentId(Integer parentId, boolean isAllStatus);

    List<T> selectByParentId(Function<LambdaQueryWrapper<T>, LambdaQueryWrapper<T>> queryWrapperFunction, Integer parentId, boolean isAllStatus);
    PageInfo<T> getPageList(CommonClassQuery query, PageDomain pageDomain);

    List<T> GetListAll();

    List<T> GetListByParentIn(int parentId, boolean isAllStatus);

    List<T> GetListTreeByParentId(int parentId, boolean isThis, boolean isAllStatus);

    List<T> GetListTreeByParentId(int parentId, boolean isThis, boolean isAllStatus, Integer parentLevel);
}
